﻿using Deferred.Library.Scene;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Deferred.Editor.Scene
{
    public class DirectionalLightWrapper
    {
        public DirectionalLight DirectionalLight { get; private set; }

        public float DirectionX { get { return DirectionalLight.Direction.X; } set { DirectionalLight.Direction = new Vector3(value, DirectionalLight.Direction.Y, DirectionalLight.Direction.Z); } }
        public float DirectionY { get { return DirectionalLight.Direction.Y; } set { DirectionalLight.Direction = new Vector3(DirectionalLight.Direction.X, value, DirectionalLight.Direction.Z); } }
        public float DirectionZ { get { return DirectionalLight.Direction.Z; } set { DirectionalLight.Direction = new Vector3(DirectionalLight.Direction.X, DirectionalLight.Direction.Y, value); } }

        public byte ColorR { get { return DirectionalLight.Color.R; } set { DirectionalLight.Color = new Color(value, DirectionalLight.Color.G, DirectionalLight.Color.B); } }
        public byte ColorG { get { return DirectionalLight.Color.G; } set { DirectionalLight.Color = new Color(DirectionalLight.Color.R, value, DirectionalLight.Color.B); } }
        public byte ColorB { get { return DirectionalLight.Color.B; } set { DirectionalLight.Color = new Color(DirectionalLight.Color.R, DirectionalLight.Color.G, value); } }

        public DirectionalLightWrapper(DirectionalLight directionalLight)
        {
            DirectionalLight = directionalLight;
        }
    }
}
